import request from '@/utils/request';

// 获取代币价格信息
export function getTokenPriceInfo(data: any) {
  return request({
    url: '/web3/market/token/price-info',
    method: 'post',
    data: data
  });
}

// 获取代币基础信息
export function getTokenBasicInfo(data: any) {
  return request({
    url: '/web3/market/token/basic-info',
    method: 'post',
    data: data
  });
}

// 搜索代币
export function searchTokens(params: any) {
  return request({
    url: '/web3/market/token/search',
    method: 'get',
    params: params
  });
}

// 获取代币榜单
export function getTokenTopList(params: any) {
  return request({
    url: '/web3/market/token/toplist',
    method: 'get',
    params: params
  });
}

// 获取代币持有人信息
export function getTokenHolders(params: any) {
  return request({
    url: '/web3/market/token/holder',
    method: 'get',
    params: params
  });
}

// 获取交易数据
export function getTrades(params: any) {
  return request({
    url: '/web3/market/trades',
    method: 'get',
    params: params
  });
}

// 获取K线数据
export function getCandles(params: any) {
  return request({
    url: '/web3/market/candles',
    method: 'get',
    params: params
  });
}

// 获取历史K线数据
export function getHistoricalCandles(params: any) {
  return request({
    url: '/web3/market/historical-candles',
    method: 'get',
    params: params
  });
}